package com.quan;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
@EnableFeignClients
@EnableHystrix
public class ApplicationGatewayServer implements CommandLineRunner, DisposableBean {
	
	private static final Logger logger = LoggerFactory.getLogger(ApplicationGatewayServer.class);
	
	public static void main(String[] args) {
		SpringApplication.run(ApplicationGatewayServer.class, args) ;
	}
	
	@Override
	public void run(String... args) throws Exception {
		logger.info("**********************************************");
		logger.info("GatewayServer网关服务 启动.....");
		logger.info("**********************************************");
	}
	
	@Override
	public void destroy() throws Exception {
		logger.info("**********************************************");
		logger.info("GatewayServer网关服务  关闭.....");
		logger.info("**********************************************");
	}

}
